/*  static char SccsId[] = "@(#)aidfile.h	1.6   8/1/95";
 *
 *		Copyright (c) KUBOTA Corporation,
 *		1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of 
 *  KUBOTA Corp. and may not be used, copied or made available to anyone,
 *  except in accordance with the license under which it is furnished.
 */

#ifndef _AID_FILE_HEADER__
#define	_AID_FILE_HEADER__

#include	"acfile.h"		/* Aurora Data file header */

/********************************************************************/

/* Texture/Sprite Image data format */
#define AID_IMG_FORMAT_INDEX9		AC_COLOR_TYPE_INDEX9
#define AID_IMG_FORMAT_INDEX12		AC_COLOR_TYPE_INDEX12
#define AID_IMG_FORMAT_INDEX16		AC_COLOR_TYPE_INDEX16
#define AID_IMG_FORMAT_INDEX8		AC_COLOR_TYPE_INDEX8
#define AID_IMG_FORMAT_UNPACK12		AC_COLOR_TYPE_UNPACK12
#define AID_IMG_FORMAT_YUV888		AC_COLOR_TYPE_YUV888
#define AID_IMG_FORMAT_YUV844		AC_COLOR_TYPE_YUV844
#define AID_IMG_FORMAT_RGB888		AC_COLOR_TYPE_RGB888
#define AID_IMG_FORMAT_RGB555		AC_COLOR_TYPE_RGB555

/* Background Image data format (use in CWT) */
#define AID_BG_IMAGE  			0x80
#define AID_BG_FORMAT_INDEX9		(AC_COLOR_TYPE_INDEX9|AID_BG_IMAGE)
#define AID_BG_FORMAT_INDEX12		(AC_COLOR_TYPE_INDEX12|AID_BG_IMAGE)
#define AID_BG_FORMAT_INDEX16		(AC_COLOR_TYPE_INDEX16|AID_BG_IMAGE)
#define AID_BG_FORMAT_INDEX8		(AC_COLOR_TYPE_INDEX8|AID_BG_IMAGE)
#define AID_BG_FORMAT_UNPACK12		(AC_COLOR_TYPE_UNPACK12|AID_BG_IMAGE)
#define AID_BG_FORMAT_YUV888		(AC_COLOR_TYPE_YUV888|AID_BG_IMAGE)
#define AID_BG_FORMAT_YUV844		(AC_COLOR_TYPE_YUV844|AID_BG_IMAGE)
#define AID_BG_FORMAT_RGB888		(AC_COLOR_TYPE_RGB888|AID_BG_IMAGE)
#define AID_BG_FORMAT_RGB555		(AC_COLOR_TYPE_RGB555|AID_BG_IMAGE)

/*******************
  for file image
 *******************/

/********************************************************************/
/* define type of file image structure */

typedef struct { /* 16 bytes */
/* Aurora tools characteristic structure member <16 bytes> */
	CARD16	display_mode;		/* 48..49 */
	CARD16	colormap_type;		/* 50..51 */
	CARD16	colormap_id;		/* 52..53 */
	CARD16	imagetbl_cnt;		/* 54..55 */
	CARD32	imagetbl_addr;		/* 56..59 */
	CARD32	imagetbl_size;		/* 60..63 */
} fimagehdr_t;


typedef struct { /* 40 bytes */
	CARD8	image_id;		/*  0..0  */
	CARD8	bank;			/*  1..1  */
	CARD8	image_format;		/*  2..2  */
	CARD8	reserved1[5];		/*  3..7  */
	CARD8	image_name[16];		/*  8..23  */
	CARD16	image_pos_x;		/* 24..25  */
	CARD16	image_pos_y;		/* 26..27  */
	CARD16	image_width;		/* 28..29  */
	CARD16	image_height;		/* 30..31  */
	CARD32	image_addr;		/* 32..35  */
	CARD32	image_size;		/* 36..39  */
} fimagetbl_t;

/********************************************************************/
/* define type of memory image structure */

typedef struct {
/* Aurora tools characteristic structure member */
	CARD16	display_mode;
	CARD16	colormap_type;
	CARD16	colormap_id;
	CARD16	imagetbl_cnt;
	void	*imagetbl_addr;
	CARD32	imagetbl_size;
} imagehdr_t;


typedef struct {
	CARD8	image_id;
	CARD8	bank;	
	CARD8	image_format;
	CARD8	reserved1[5];
	CARD8	image_name[16];	
	CARD16	image_pos_x;
	CARD16	image_pos_y;
	CARD16	image_width;
	CARD16	image_height;
	void	*image_addr;	
	CARD32	image_size;
} imagetbl_t;

/********************************************************************/

#endif	/* _AID_FILE_HEADER__ */

